package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotPickDeviceFaceMapper;
import com.ruoyi.wisdom.domain.IotPickDeviceFace;
import com.ruoyi.wisdom.service.IIotPickDeviceFaceService;

/**
 * 设备人脸库Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-21
 */
@Service
public class IotPickDeviceFaceServiceImpl implements IIotPickDeviceFaceService
{
    @Autowired
    private IotPickDeviceFaceMapper pickDeviceFaceMapper;

    /**
     * 查询设备人脸库
     * 
     * @param id 设备人脸库主键
     * @return 设备人脸库
     */
    @Override
    public IotPickDeviceFace selectIotPickDeviceFaceById(Long id)
    {
        return pickDeviceFaceMapper.selectIotPickDeviceFaceById(id);
    }

    @Override
    public IotPickDeviceFace selectIotPickDeviceFace(IotPickDeviceFace pickDeviceFace)
    {
        return pickDeviceFaceMapper.selectIotPickDeviceFace(pickDeviceFace);
    }

    /**
     * 查询设备人脸库列表
     * 
     * @param pickDeviceFace 设备人脸库
     * @return 设备人脸库
     */
    @Override
    public List<IotPickDeviceFace> selectIotPickDeviceFaceList(IotPickDeviceFace pickDeviceFace)
    {
        return pickDeviceFaceMapper.selectIotPickDeviceFaceList(pickDeviceFace);
    }

    /**
     * 新增设备人脸库
     * 
     * @param pickDeviceFace 设备人脸库
     * @return 结果
     */
    @Override
    public int insertIotPickDeviceFace(IotPickDeviceFace pickDeviceFace)
    {
        pickDeviceFace.setCreateTime(DateUtils.getNowDate());
        return pickDeviceFaceMapper.insertIotPickDeviceFace(pickDeviceFace);
    }

    /**
     * 修改设备人脸库
     * 
     * @param pickDeviceFace 设备人脸库
     * @return 结果
     */
    @Override
    public int updateIotPickDeviceFace(IotPickDeviceFace pickDeviceFace)
    {
        pickDeviceFace.setUpdateTime(DateUtils.getNowDate());
        return pickDeviceFaceMapper.updateIotPickDeviceFace(pickDeviceFace);
    }

    @Override
    public int updateIotPickDeviceFaceByParams(IotPickDeviceFace pickDeviceFace)
    {
        pickDeviceFace.setUpdateTime(DateUtils.getNowDate());
        return pickDeviceFaceMapper.updateIotPickDeviceFaceByParams(pickDeviceFace);
    }

    /**
     * 批量删除设备人脸库
     * 
     * @param ids 需要删除的设备人脸库主键
     * @return 结果
     */
    @Override
    public int deleteIotPickDeviceFaceByIds(Long[] ids)
    {
        return pickDeviceFaceMapper.deleteIotPickDeviceFaceByIds(ids);
    }

    /**
     * 删除设备人脸库信息
     * 
     * @param id 设备人脸库主键
     * @return 结果
     */
    @Override
    public int deleteIotPickDeviceFaceById(Long id)
    {
        return pickDeviceFaceMapper.deleteIotPickDeviceFaceById(id);
    }
}
